-
-
Notifications
You must be signed in to change notification settings - Fork 865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trace Paths in Entrypoint #395
Trace Paths in Entrypoint #395
Conversation
Thank you for your contribution. We're sorry we're not able to provide feedback sooner. Currently our focus lies on releasing the next version. Then we'll get back to you on this suggestion. |
It's also important that we invalidate the cache after tracing the paths, otherwise the traced paths will not appear. Of course, flushing the cache on every startup is not ideal... |
I get where the idea to integrate this comes from. But these are only relevant during upgrades. And tracing paths was required once because the DB model changed, wasn't it? But I agree that a better upgrade management would be nice. Yet it would be non-trivial to implement reliably. |
I found this solution for me
|
I think this is an important topic for frequent upgraders. We should devise a way to handle this for sure. |
Superseded by PR #507 |
New Behavior
Adds a new script (
trace_paths
) to the netbox container entrypoint.The fact that
netbox-docker
currently does not call this script broke cable traces in our environment after an upgrade to NetBoxv2.10.0
due to changes in the cable tracing logic.Contrast to Current Behavior
The script is currently not called in entrypoint or any other place in
netbox-docker
as far as I can see.Discussion: Benefits and Drawbacks
The script will run on every container start, this is probably a bit overkill, especially in K8s scenarios. However, the script should only retrace missing cable traces, so the overhead shouldn't be too big.
If you have suggestions for a different location, I'm open for it, but since it's doing DB operations I'm not sure where else it would fit
The
netbox
upgrade script also callsremove_stale_contenttypes
,clearsessions
, and the cacheinvalidate all
.Maybe these should be added to the entrypoint as well? I think this would solve a lot of issues related to upgrading the
netbox-docker
image in an environment.I don't think these are as critical as
trace_paths
, but I'll gladly add them to this PR if you agree.Changes to the Wiki
I don't think anything is necessary here, but adding a "How to upgrade" wiki page might be something worth considering.
Proposed Release Note Entry
The NetBox
manage.py
commandtrace_paths
from the NetBox upgrade script is now called in docker entrypointDouble Check
develop
branch.